package com.tool_stdy.Proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * Created by yan_li on 2016/1/31.
 */
public class UserProxyDAO<T> implements InvocationHandler {

    private T t;
    UserProxyDAO(T t){
        this.t=t;
    }
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("拦截地方法是:"+method.getName()+"==>"+args.length);
        return method.invoke(t,args);
    }
}
